
module.exports = Behavior({
    properties: {
        loading: { //登录按钮状态
            type: Boolean,
            value: false
        }
    },

    methods: {

        /*
        * 输入监听
        * */
        onInput: function (e) {
            let val = e.detail;
            let name = e.currentTarget.dataset.name;
            let errorMsg = this.data["_" + name + "ErrorMsg"];
            this.data["_" + name] = val;
            errorMsg ? this.setData({
                ["_" + name + "ErrorMsg"]: ""
            }) : null
        }

    }
})